﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackOffice.Master" AutoEventWireup="true" CodeBehind="Advertisement_Maintenance.aspx.cs" Inherits="BackOffice.Advertisement_Maintenance" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
        <tr>
            <td>
                <asp:Label ID="lblStatus" runat="server" Text="Status"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlStatus" runat="server">
                    <asp:ListItem Selected="True" Value="1">Pending</asp:ListItem>
                    <asp:ListItem Value="2">Approved</asp:ListItem>
                    <asp:ListItem Value="3">Expired</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="Search" 
                    onclick="btnSearch_Click" />
            </td>
        </tr>

        <tr>
            <td colspan="3">
                <asp:GridView ID="Advertisement_Grid" runat="server" 
                    AutoGenerateColumns="False">
                    <Columns>
                        <asp:TemplateField HeaderText = "No.">
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Image">
                            <ItemTemplate>
                                <a href='Advertisement_Maintenance2.aspx?ID=<%#Eval("ID") %>'>
                                    <asp:Image ID="image" runat="server" ImageUrl='<%#Eval("ImagePath") %>' Height="50px" Width="50px" />
                                </a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText = "Vendor">
                            <ItemTemplate>
                                <asp:Label ID="lblMemberName" runat="server"><%#Eval("Name") %></asp:Label>
                            </ItemTemplate> 
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Date Apply">
                            <ItemTemplate>
                                <asp:Label ID="lblEmailAddress" runat="server"><%#Eval("DateApply") %></asp:Label>
                            </ItemTemplate> 
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Date Approved">
                            <ItemTemplate>
                                <asp:Label ID="lblPhone" runat="server"><%#Eval("DateApproved") %></asp:Label>
                            </ItemTemplate> 
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Date Expired">
                            <ItemTemplate>
                                <asp:Label ID="lblDateCreated" runat="server"><%#Eval("DateExpired") %></asp:Label>
                            </ItemTemplate> 
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Approved By">
                            <ItemTemplate>
                                <asp:Label ID="lblStat" runat="server"><%#Eval("ApprovedBy") %></asp:Label>
                            </ItemTemplate> 
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Period">
                            <ItemTemplate>
                                <asp:Label ID="lblRewardPoint" runat="server"><%#Eval("Period") %></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Size">
                            <ItemTemplate>
                                <asp:Label ID="lblAmountSpent" runat="server"><%#Eval("PictureSize") %></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText = "Total Price">
                            <ItemTemplate>
                                <asp:Label ID="lblPrice" runat="server"><%#Eval("TotalPrice") %></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>

                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
